package com.xinghai.system.service;

import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
import com.xinghai.system.domain.DingUser;
import com.xinghai.system.domain.dto.DingTalkTodoDTO;
import com.xinghai.system.domain.dto.XhVehicleInfoDTO;
import com.xinghai.system.domain.dto.XhVehicleOrderInfoDTO;
import com.xinghai.system.domain.vo.*;

import java.io.FileNotFoundException;
import java.net.MalformedURLException;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * dingding 业务层
 * 
 * @author xinghai
 */
public interface DingdingOaService
{
    public String createFlow(Long id) throws MalformedURLException;

    public String getToken();

    public boolean approvalFlow(DingApprovalResDTO dingApprovalResDTO);

    public void addComments(Long id) throws Exception;

    public void addNotice(String str,Boolean isBack);

    public String send(String text,String userId) throws Exception;

    public List<DingTalkDeptVo> departmentList();

    public List<DingTalkUserVo> getUserDepartmentList(String deptId);

    public List<DingTalkDeptVo> getSyNcOrganizational();

    public void saveCollection(Collection<?> collection);

    public List<DingTalkDeptVo> getLocalList();

    public String initiate(XhVehicleInfoDTO dto);

    GetProcessInstanceResponseBody getWorkflowByProcessInstancesId(String processInstanceId) throws Exception;

    public String getUserByPhone(String mobile);

    List<DingUser> getDingUserList(String mobile);

    void dispatchVehicle(String instanceId);

    public String createContract(CreateContractRequestVo request) throws FileNotFoundException;

    public void checkOrderStatuses();

    void redirectVehicle(XhVehicleOrderInfoDTO xhVehicleOrderInfoDTO, String username);

    List<MaterialShowTabVo> getUrlPathToMaterial(String type, String vehicleId);

    Boolean cancelWorkflowByProcessInstancesId(Map<String,String> cancelVO) throws Exception;

    String downloadContract(Long id);

    void genQualityLoss(String instanceId, String type, String activityName);

    String getPwScan(String code);

    List<DingTalkDeptVo> recursionDeptList(DingTalkDeptVo vo);

    String createPlan(DingTalkTodoDTO dto);

    String getUnionid(String userId);
}
